Ramer–Douglas–Peucker algorithm